const path = require("path");
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
  entry: "./src/index.js",
  output: {
    filename: "bundle.js",
    path: path.resolve(__dirname, "./dist"), //path必须是绝对路径
    clean:true//清除无关的文件
  },
  mode: "none",
  plugins: [new HtmlWebpackPlugin({
    template:'./index.html',
    filename:'my-webpack.html',
    inject:'body'
  })],
};
